package com.deductive.domain.wq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 伤员分布信息表
 * @TableName disposition_wq_syfb
 */
@TableName(value ="disposition_wq_syfb")
@Data
public class DispositionWqSyfb implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 性别
     */
    @TableField(value = "sex")
    private String sex;

    /**
     * 年龄
     */
    @TableField(value = "age")
    private String age;

    /**
     * 部别
     */
    @TableField(value = "department")
    private String department;

    /**
     * 职位
     */
    @TableField(value = "position")
    private BigDecimal position;

    /**
     * 军衔
     */
    @TableField(value = "rank")
    private String rank;

    /**
     * 伤部
     */
    @TableField(value = "wounded_area")
    private String woundedArea;

    /**
     * 伤类
     */
    @TableField(value = "injury_category")
    private String injuryCategory;

    /**
     * 伤型
     */
    @TableField(value = "injury_type")
    private String injuryType;

    /**
     * 并发症
     */
    @TableField(value = "complications")
    private String complications;

    /**
     * 伤势
     */
    @TableField(value = "injury")
    private String injury;

    /**
     * 血型
     */
    @TableField(value = "blood_type")
    private String bloodType;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DispositionWqSyfb other = (DispositionWqSyfb) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getDepartment() == null ? other.getDepartment() == null : this.getDepartment().equals(other.getDepartment()))
            && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition()))
            && (this.getRank() == null ? other.getRank() == null : this.getRank().equals(other.getRank()))
            && (this.getWoundedArea() == null ? other.getWoundedArea() == null : this.getWoundedArea().equals(other.getWoundedArea()))
            && (this.getInjuryCategory() == null ? other.getInjuryCategory() == null : this.getInjuryCategory().equals(other.getInjuryCategory()))
            && (this.getInjuryType() == null ? other.getInjuryType() == null : this.getInjuryType().equals(other.getInjuryType()))
            && (this.getComplications() == null ? other.getComplications() == null : this.getComplications().equals(other.getComplications()))
            && (this.getInjury() == null ? other.getInjury() == null : this.getInjury().equals(other.getInjury()))
            && (this.getBloodType() == null ? other.getBloodType() == null : this.getBloodType().equals(other.getBloodType()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getDepartment() == null) ? 0 : getDepartment().hashCode());
        result = prime * result + ((getPosition() == null) ? 0 : getPosition().hashCode());
        result = prime * result + ((getRank() == null) ? 0 : getRank().hashCode());
        result = prime * result + ((getWoundedArea() == null) ? 0 : getWoundedArea().hashCode());
        result = prime * result + ((getInjuryCategory() == null) ? 0 : getInjuryCategory().hashCode());
        result = prime * result + ((getInjuryType() == null) ? 0 : getInjuryType().hashCode());
        result = prime * result + ((getComplications() == null) ? 0 : getComplications().hashCode());
        result = prime * result + ((getInjury() == null) ? 0 : getInjury().hashCode());
        result = prime * result + ((getBloodType() == null) ? 0 : getBloodType().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", sex=").append(sex);
        sb.append(", age=").append(age);
        sb.append(", department=").append(department);
        sb.append(", position=").append(position);
        sb.append(", rank=").append(rank);
        sb.append(", woundedArea=").append(woundedArea);
        sb.append(", injuryCategory=").append(injuryCategory);
        sb.append(", injuryType=").append(injuryType);
        sb.append(", complications=").append(complications);
        sb.append(", injury=").append(injury);
        sb.append(", bloodType=").append(bloodType);
        sb.append(", remark=").append(remark);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}